import 'package:equatable/equatable.dart';

class WordBaseUseCaseInput extends Equatable {
  const WordBaseUseCaseInput({
    required this.id,
    required this.exampleMarkdown,
    required this.correspondingUseCaseIndex,
    required this.promoted,
  });

  final String id;
  final String exampleMarkdown;
  final int? correspondingUseCaseIndex;
  final bool promoted;

  @override
  List<Object?> get props {
    return [
      id,
      exampleMarkdown,
      correspondingUseCaseIndex,
      promoted,
    ];
  }

  WordBaseUseCaseInput copyWith({
    String Function()? id,
    String Function()? exampleMarkdown,
    int? Function()? correspondingUseCaseIndex,
    bool Function()? promoted,
  }) {
    return WordBaseUseCaseInput(
      id: id == null ? this.id : id(),
      exampleMarkdown: exampleMarkdown == null ? this.exampleMarkdown : exampleMarkdown(),
      correspondingUseCaseIndex: correspondingUseCaseIndex == null
          ? this.correspondingUseCaseIndex
          : correspondingUseCaseIndex(),
      promoted: promoted == null ? this.promoted : promoted(),
    );
  }
}
